# coding: utf-8
from marshmallow import Schema, fields
from model.model_base import Base
from sqlalchemy import Column, String


class ProblemTypeList(Base):
    # 问题类型对照表
    __tablename__ = 'ProblemTypeList'
    proid = Column(String(2), primary_key=True, comment='问题id')
    proname = Column(String(50), nullable=False, comment='问题名称')
    protype = Column(String(1), nullable=False, default=1, comment='问题类型（1专变/2公变/3低压）')
    photoflag = Column(String(1), nullable=False, default=0, comment='是否强制拍照（0否1是）')


class ProblemTypeListSchema(Schema):
    proid = fields.String()
    proname = fields.String()
    protype = fields.String()
    photoflag = fields.String()


problemTypeListSchema = ProblemTypeListSchema()



